package com.renu.jdependencyanalyser.model;

import java.util.HashSet;
import java.util.Set;

public class PackageModel {
    /**
     * jarSig : pckName
     */
    private String pckSig;

    private String pckName;

    private String jarSig;

    private Set<String> classNames;

    private PackageModel() {
        pckSig = "";
        classNames = new HashSet<>();
    }

    public PackageModel(String jarSig,String pckName) {
        this();
        this.jarSig = jarSig;
        this.pckName = pckName;
        this.pckSig =  pckName;
    }

    public String getPckSig() {
        return pckSig;
    }

    public void setPckSig(String pckSig) {
        this.pckSig = pckSig;
    }

    public String getPckName() {
        return pckName;
    }

    public void setPckName(String pckName) {
        this.pckName = pckName;
    }

    public String getJarSig() {
        return jarSig;
    }

    public void setJarSig(String jarSig) {
        this.jarSig = jarSig;
    }

    public Set<String> getClassName() {
        return classNames;
    }

    public void setClassName(Set<String> className) {
        this.classNames = className;
    }

    public void addClass(String className) {
        if (classNames.contains(className)){
            return ;
        }
        classNames.add(className);
    }
}
